package com.haoshuang.zhouzhoubang.ui.adapter

import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemIamge23Binding
import com.haoshuang.zhouzhoubang.model.bean.Image2Bean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.gone
import com.mufeng.libs.utils.view.load
import com.mufeng.libs.utils.view.visible


/**
 * 图片列表适配器
 * */
class ImageAdapter23(data: MutableList<Image2Bean>) :
    BaseBindingQuickAdapter<Image2Bean, ItemIamge23Binding>(data){

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: Image2Bean?) {
        val binding = ItemIamge23Binding.bind(holder.itemView)
        binding.apply {
            if (item?.isVideo==0){
                imageView.load(item?.image)
                ivVideo.gone()
            }else{
                imageView.load(item?.image)
                ivVideo.visible()
            }

        }

    }

}